{template top_set}
<script type="text/javascript">
$(function(){
	$("#dbTable tbody tr:even").addClass("trEven");
	$('#dbTable input[type="checkbox"]:checked').parents('tr').addClass('trSelected');
	$("#dbTable input[type='checkbox']").focus(function(){this.blur()});

	$("#dbTable tbody tr").live('mouseover',function(){
		//$(this).addClass("trHover");
		this.style.backgroundColor="#fefedd";
	}).live('mouseout',function(){
		//$(this).removeClass("trHover");
		this.style.backgroundColor="";
	});
})
</script>
<ul class="set_nav">
    <li><a href="index.php?mod=message&act=manage&do=system_set">系统管理</a></li>
    <li><a href="index.php?mod=message&act=manage&do=theme_set">主题设置</a></li>
    <li><a href="index.php?mod=message&act=manage&do=account_set" class="select">管理员设置</a></li>
    <li><a href="index.php?mod=message&act=manage&do=message_set">留言管理</a></li>
</ul>
<div class="stage_content">
	<fieldset>
		<legend>我的安全设置</legend>
		<form id="secForm" action="index.php?mod=message&act=manage&do=setsave" name="secForm" onsubmit="return false;">
		<dl class="setting">
			<dt><label for="password" accesskey="">原密码</label></dt>
			<dd><input type="password" name="password" id="password" class="text_input" value="" maxLength="16"/></dd>
			<dt><label for="new-password" accesskey="">新密码</label></dt>
			<dd><input type="password" name="new-password" id="new-password" class="text_input" value=""  maxLength="16"/></dd>
			<dt><label for="renew-password" accesskey="">重新输入新密码</label></dt>
			<dd><input type="password" name="renew-password" id="renew-password" class="text_input" dataType="Repeat" to="new-password" maxLength="16"/>&nbsp;&nbsp;&nbsp;&nbsp;<span class="error" style="color:red;display:none;" >两次密码输入不一致</span></dd>
			<dt><label for="question" accesskey="">提示问题</label></dt>
			<dd><input type="text" name="question" id="question" class="text_input" value="{$info['question']}"/></dd>
			<dt><label for="answer" accesskey="">问题答案</label></dt>
			<dd><input type="text" name="answer" class="text_input" id="answer" value="{$info['answer']}"/></dd>
		</dl>
		</form>
		<div class="clear"></div>
		<div class="btn_center"> <input type="button" value="保存" class="stage_btn" onclick="changeSec();"/></div>
	</fieldset>
	<p>&nbsp;</p>
	<!--{if $info['su'] == 1}-->
    <table width="800" class="tb_center" border="0" cellspacing="0" cellpadding="0">
	  <tr>
	    <td width="97"><input type="button" value="添加管理员" class="btn_style1" onclick="showAddUser()" /></td>
	  </tr>
	</table>
	<table cellspacing="0" id="dbTable" class="comm_tbstyle">
	 <thead>
	  <tr>
	  	<th width="30" class="No"></th>
	   	<th width="140">用户名</th>
	   	<th width="135">权限</th>
	  	<th width="171">添加时间</th>
	   	<th width="170">最后登录时间</th>
	   	<th width="140" colspan="2">操作</th>
	  </tr>
	 </thead>
	 <tbody id="accountList">
	<!-- {loop $accounts $key=>$account} -->
	<tr <!--{if !$account['even']}-->class="trEven"<!--{/if}--> id="user_{$account['id']}" >
		<td class="No">{$account['id']}</td>
		<td>{$account['username']}</td>
		<td><!--{if $account['su']==1}-->超级管理员<!--{else}-->普通管理员<!--{/if}--></td>
		<td><!--{eval echo $account["createtime"] ? date("Y-m-d H:i",$account["createtime"]) : ''}--></td>
		<td><!--{eval echo $account["lasttime"] ? date("Y-m-d H:i",$account["lasttime"]) : ''}--></td>
		<td colspan="2"><a href="javascript:void(0);" onclick="showEditUser({$account['id']});">修改密码</a>&nbsp;&nbsp;<a href="javascript:void(0);" onclick="delUser({$account['id']})">删除</a></td>
	</tr>
	<!-- {/loop} -->
	</tbody>
	</table>
	<!--{/if}-->
  </div>
<!-- add -->
<div class="layer_box" id="addUser" style="left:50%;top:50%;position:fixed;width:440px;display:none;z-index:1500">
	<div class="layer_content">
		<a href="javascrip:void(0);" class="closed_2">close</a>
	    <h2>添加管理员</h2>
	    <div class="login_box">
	    	<form id="addUserForm" action="index.php?mod=message&act=manage&do=addUser" name="addUserForm" onsubmit="return false;">
			<dl class="setting">
				<dt><label for="addUsername" accesskey="">用户名</label></dt>
				<dd><input type="text" name="addUsername" class="text_input" id="addUsername" dataType="Require"/></dd>
				<dt><label for="addPassword" accesskey="">密码</label></dt>
				<dd><input type="password" name="addPassword" class="text_input" id="addPassword" dataType="Require"/></dd>
				<dt><label for="roll" accesskey="">设置权限</label></dt>
				<dd><select id="roll"><option value="0">普通管理员</option><option value="1">超级管理员</option></select></dd>
			</dl>
			</form>
			<div class="clear"></div>
			<p class="line"></p>
			<p class="double_btn"><a class="btn margin_r90" href="javascript:void(0);" onclick="addUser();"><span>确 定</span></a><a class="btn" href="javascript:void(0);" onclick="hideAddUser();"><span>取 消</span></a></p>
		</div>
	</div>
</div>
<!--add end-->
<!-- edit -->
<div class="layer_box" id="editUser" style="left:50%;top:50%;position:fixed;width:440px;display:none;z-index:1500">
	<div class="layer_content">
		<a href="javascript:void(0);" class="closed_2">close</a>
		<h2>修改管理员密码</h2>
		<div class="login_box">
			<form id="editUserForm" action="index.php?mod=message&act=manage&do=editUser" name="editUserForm" onsubmit="return false;">
			<dl class="setting">
				<dt><label for="editNewPassword" accesskey="">新密码</label></dt>
				<dd><input type="password" name="editNewPassword" class="text_input" id="editNewPassword" dataType="Require" /></dd>
				<dt><label for="editRePassword" accesskey="">重新输入新密码</label></dt>
				<dd><input type="password" name="editRePassword" class="text_input" id="editRePassword" dataType="Repeat" to="editNewPassword"/></dd>
			</dl>
			<input id="editUid" type="hidden" value="" />
			</form>
		<div class="clear"></div>
		<p class="line"></p>
		<p class="double_btn"><a class="btn margin_r90" href="javascript:void(0);" onclick="editUser();"><span>确 定</span></a><a class="btn" href="javascript:void(0);" onclick="hideEditUser();"><span>取 消</span></a></p>
		</div>
	</div>
</div>
<!--edit end-->
{template foot_set}